<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreatePersonTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('person', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('department')->comment('单位');
            $table->string('name', 20)->default('')->comment('姓名');
            $table->string('work_no', 10)->default('')->comment('工号');
            $table->string('category', 30)->default('')->comment('工种');
            $table->text('station')->nullable()->comment('工位');
            $table->text('job')->nullable()->comment('岗位资质');
            $table->date('working_certificate_start_date')->nullable()->comment('上岗开始时间');
            $table->date('working_certificate_end_date')->nullable()->comment('上岗结束时间');
            $table->date('sub_working_certificate_start_date')->nullable()->comment('准上岗开始时间');
            $table->date('sub_working_certificate_end_date')->nullable()->comment('准上岗结束时间');
            $table->string('photo')->nullable()->comment('照片');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('person');
    }
}
